]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Close the current box pointer when clicking on the same item
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 16 Aug 2012 17:54:03 +0000 (13:54 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 20 Aug 2012 01:15:51 +0000 (21:15 -0400)
js/ui/messageTray.js

index fde083385a7a191a63ac2f9d801eaa83c47237b1..5b0403a4c8eeaaecb79004371b8d2c63a76d8935 100644 (file)
@@ -1640,7 +1640,8 @@ const MessageTray = new Lang.Class({
         if (summaryItem.source.handleSummaryClick()) {
             this._setClickedSummaryItem(null);
         } else {
-            this._setClickedSummaryItem(summaryItem, button);
+            if (!this._setClickedSummaryItem(summaryItem, button))
+                this._setClickedSummaryItem(null);
         }
 
         this._updateState();
@@ -2251,7 +2252,7 @@ const MessageTray = new Lang.Class({
     _setClickedSummaryItem: function(item, button) {
         if (item == this._clickedSummaryItem &&
             button == this._clickedSummaryItemMouseButton)
-            return;
+            return false;
 
         if (this._clickedSummaryItem) {
             this._clickedSummaryItem.actor.remove_style_pseudo_class('selected');
@@ -2278,6 +2279,8 @@ const MessageTray = new Lang.Class({
             this._trayMotionId = Main.layoutManager.trayBox.connect('notify::anchor-y',
                                                                     Lang.bind(this, this._adjustSummaryBoxPointerPosition));
         }
+
+        return true;
     },
 
     _onSummaryBoxPointerUngrabbed: function() {